﻿@model  IQueryable<YTCMS.Domain.Entities.vehicle>
@using YTCMS.Core
<table class="table table-striped table-bordered bootstrap-datatable datatable table-hover">
    <thead>
        <tr>
            <th>交通工具名称</th>
            <th>买入价(人民币)</th>
            <th>销售价(人民币)</th>
            <th>创建时间</th>
            <th>状态</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model)
        {
            <tr>
                <td>@item.Name</td>
                <td>@item.Pay ￥</td>
                <td>@item.Market ￥</td>
                <td>@item.CreateTime.ToString("yyyy-MM-dd HH:mm:ss")</td>
                <td>
                    @Html.Raw(Enum.GetName(typeof(YTCMS.Core.CommonState), item.State).AdminStateExtend())
                </td>
                <td>
                    <a class="btn btn-info" href="/Vehicle/edit?id=@item.Id">
                        <i class="fa fa-edit ">修改</i>
                    </a>
                    <a class="btn btn-danger" onclick="YTDelete('/Vehicle/Delete', {id:@item.Id})">
                        <i class="fa fa-trash-o ">删除</i>
                    </a>
                </td>
            </tr>
        }
    </tbody>
</table>

